﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Register.Command;
using Register.DALFactory;
using Register.IDAL;
using Register.Model;
namespace Register.BLL
{
    /// <summary> 
    /// FileName: AppointmentBLL.cs    
    /// CLRVersion: 4.0.30319.269    
    /// Author: DoubleZ    
    /// Corporation:     
    /// Description:     
    /// DateTime: 2012/7/13 17:20:42    
    /// </summary>
  public  class AppointmentBLL
    {
      private static string typeNameKey = "IAppointmentDALKey";
      #region 获取医生预约信息
      public static List<Model.AppointmentInfo> GetPagedAppointmentInfoInfo(int size, int pageIndex, string where)
      {
          IAppointmentDAL iAppointmentInfoInfo = DALFactory<IAppointmentDAL>.Create(typeNameKey);
          try
          {
              return iAppointmentInfoInfo.GetPagedAppointmentInfoInfo(size, pageIndex, where);
          }
          catch (Exception e)
          {
              LogRecordHelper.LogNote("ERROR", e.Message);
              throw e;
          }
      }
      public static int GetAppointmentInfoCount(string where)
      {
          IAppointmentDAL iAppointmentInfo = DALFactory<IAppointmentDAL>.Create(typeNameKey);

          try
          {
              return iAppointmentInfo.GetAppointmentInfoInfoCount(where);
          }
          catch (Exception e)
          {
              LogRecordHelper.LogNote("ERROR", e.Message);
              throw e;
          }
      }
      #endregion
    }
}
